#ifndef _APPS_BDESKTOP_CAUDIOITEM_H_
#define _APPS_BDESKTOP_CAUDIOITEM_H_

#include "ctopbaritem.h"
#include <buola/media/cmixer.h>
#include <buola/gui/caccelerator.h>

namespace buola { namespace bdesktop {

class CAudioItem : public CTopBarItem
{
public:
    CAudioItem();
    virtual ~CAudioItem();

private:
    void DrawSpeaker(CGC *pGC,bool pShadow);

public:
    virtual double GetWidth();
    virtual void Draw(CGC *pGC);
    virtual void OnClick(gui::CMouseEvent*);

    void OnMixer(media::CMixer::TElement pElement);
    void OnVolumeKey(double pChange);
    void OnVolumeMute();
    
    media::CMixer *mMixer;
    double mValue;
    bool mMuted;
    
    gui::CAccelerator mVolUp;
    gui::CAccelerator mVolDown;
    gui::CAccelerator mVolMute;
};

/*namespace bdesktop*/ } /*namespace buola*/ }

#endif
